import 'package:smart_shoes/module/Login/login.dart';
import 'package:smart_shoes/module/map/map/show_layer/Feature/danger_warning.dart';
import 'package:smart_shoes/module/my/account/account_setting.dart';
import 'package:smart_shoes/module/my/account/change_nickname.dart';
import 'package:smart_shoes/module/my/device/add_device.dart';
import 'package:smart_shoes/module/my/device/my_device.dart';
import 'package:smart_shoes/module/my/mine.dart';
import 'package:smart_shoes/module/my/share/my_share.dart';
import 'package:smart_shoes/router/app_router.dart';

import 'package:get/get.dart';
import 'package:smart_shoes/router/router_auth.dart';

import '../module/root/home.dart';

class AppPage {
  static const INITIAL = AppRoutes.my;
  static final List<GetPage> routes = [
    // 白名单
    GetPage(name: AppRoutes.login, page: () => LoginPage()),
    GetPage(name: AppRoutes.home, page: () => HomePage()),
    GetPage(name: AppRoutes.myDevice, page: () => MyDevice()),
    GetPage(name: AppRoutes.myShare, page: () => MyShare()),
    GetPage(name: AppRoutes.addDevice, page: () => AddDevicePage()),
    GetPage(
      name: AppRoutes.changeNicknamePage,
      page: () => ChangeNicknamePage(),
    ),
    GetPage(
      name: AppRoutes.accountSettingPage,
      page: () => AccountSettingPage(),
    ),
    GetPage(
      name: AppRoutes.dsangerWarningPage,
      page: () => DangerWarningPage(),
    ),
    GetPage(
      name: AppRoutes.my,
      // Change to a function that returns an instance of MyPage
      page: () => MyPage(),
      middlewares: [RouteAuthMiddleware(priority: 1)],
    ),
  ];
}
